Conversation
|
@dkillick @pp-mo Should I put in some bits at the end of each test to delete the saved files? |
| def setUp(self): | ||
| self.filepath = self.get_testdata_path( | ||
| 'faked_sample_hh_grib_data.grib2') | ||
| self.out_path = self.get_result_path( |
There was a problem hiding this comment.
I wouldn't store these results here (or even create this branch of the repo), as these are transient results.
Files living in tests/results should really be "independent" data that we want to store in the repo as a reference to compare results against.
Instead, I think it's appropriate to create temporary files which are then removed afterwards, using this pattern ...
|
|
||
| class TestHybridHeightRoundTrip(tests.IrisGribTest): | ||
| def setUp(self): | ||
| self.filepath = self.get_testdata_path( |
There was a problem hiding this comment.
Not sure this is actually worth a separate "setUp".
Depends if this will get shared with any other possible tests (later, presumably).
| """ | ||
| gribapi.grib_set(grib, "productDefinitionTemplateNumber", 1) | ||
| product_definition_template_common(cube, grib) | ||
| product_definition_template_common(cube, grib, full3d_cube) |
There was a problem hiding this comment.
Whoops ?!?
Another reason to have more integration tests, if this could get missed.
|
"Otherwise" LGTM 👍 -- short, but if it works that's already proving quite a lot. |
|
@pp-mo Thanks for that, useful pointers, especially the temp_filepath pattern that I didn't know about before. Cool. |
|
Wait a minute though, I still need to delete the save directories that I had before... |
|
@pp-mo @dkillick @kaedonkers Tests now passing. Any more tweaks? |
Maybe just a comment to say that/why it is loading+save a separate reference cube. I'm also interested in your |
|
@pp-mo Yeah I didn't know you could do that either, it was a bit of guesswork that got lucky because the docs are really really vague. |
|
@pp-mo Thanks! |
Round-trip integration tests for hybrid height and hybrid pressure.
Also a small fix for a bit that was forgotten and only revealed in these tests.